This invention relates generally to methods and systems for modeling physical systems using the finite element method and, more specifically, to methods and systems for creating finite element models for simulating underground reservoirs and corresponding fluid flow, especially in hydrocarbon reservoirs.
Physical systems can be modeled mathematically to simulate their behavior. There are a wide variety of means to model these systems, ranging from the very simplistic to the extremely complicated. One of the more complicated means to model physical systems is through the use of the finite element method (FEM). As the name implies, the finite element method involves the representation of individual, finite elements of the physical system in a mathematical model and the solution of this model in the presence of a predetermined set of boundary conditions.
In finite element modeling, the region that is to be analyzed is broken up into sub-regions called elements.
This process of dividing the region into sub-regions may be referred to as discretization or mesh generation. The region is represented by functions defined over each element. This generates a number of local functions that are much simpler than those which would be required to represent the entire region. The next step is to analyze the response for each element. This is accomplished by building an element matrix and vector for each element in the system. The element matrix defines the properties of the element within the region, while its vector defines the forces acting on the element. Once all the element matrices and vectors have been created, they are combined into a structure matrix equation. This equation relates nodal responses for the entire structure to nodal forces. Nodes are specific locations in the model which are used as the corners or vertices of the elements. After applying boundary conditions which are constraints on the solution by predetermined properties of the models, the structure matrix equation can be solved to obtain unknown nodal responses. Intra-element responses can be interpolated from nodal values using the functions which were defined over each element.
As indicated above, finite element modeling involves the creation of a mesh of finite elements. The elements are defined by nodes within the problem space, which may be 1-, 2-, 3- or higher dimensioned. The nodes are simply points in space. The lines between the nodes are referred to as xe2x80x9cedges.xe2x80x9d The mesh is typically a structured mesh. In other words, for a mesh defined in three dimensions, the elements within the problem space are hexahedrons. For example, they may be cubes or rectangular prisms. (Equivalently, in two dimensional problems, the elements would be rectanglesxe2x80x94see FIG. 1 for an illustration of these elements.) The edges of the hexahedrons are coincident with the edges between the nodes of the mesh. In a simple model, the nodes of the mesh may be regularly spaced to define cubic elements. It is not necessary, however, for the nodes to be evenly spaced in all finite element models. A variety of different sizes and shapes of hexahedral elements can be defined within a single mesh. Smaller elements are typically used to more accurately capture physical phenomena in a local region or to better model the physical shape.
One of the problems with meshes which use hexahedral elements is that they do not lend themselves well to complex geometries which may need to be modeled. In other words, it may be difficult to place nodes sufficiently close to irregular surfaces to accurately determine the solution to the problem along those surfaces. Viewed another way, it is difficult to fill an irregularly shaped object with regularly shaped boxes. This situation is further complicated by limitations on the minimum distance between nodes in a structured mesh. Even when additional nodes (and thus elements) can be defined in the mesh to improve the accuracy of the model, the inclusion of these additional elements causes the resources needed to solve the resulting model to rapidly increase.
These problems are compounded with each additional dimension of the problem. Because of the computational resources required in prior art structured models, inclusion of a time dimension into a single, structured four-dimensional model is impractical. This is true because meshes made up of hexahedral elements cannot be easily locally refined in size. Consequently, when a solution to a structured three-dimensional model over time is desired, the model must be solved at a first time, then again at a second time, and so on, until a series of time steps covering the desired range is completed. If it is desired to model a temporal feature more accurately, this must be achieved by decreasing the size of the time steps and computing the entire three-dimensional physical model for a greater number of time values. The computing resources which are required to generate the solution obviously increases with the smaller time steps. There is no way to localize the smaller time steps to a particular physical volume of interest.
One or more of the problems outlined above may be solved by the various embodiments of the invention. Broadly speaking, the invention comprises a method for solving space-time problems involving three-dimensional space by constructing and solving an unstructured four-dimensional finite element model. This method may provide a number of advantages over prior art methods, including xe2x80x9cfreexe2x80x9d mesh generation, faster and easier generation of solutions for the space-time model, elimination of the need for a four-dimensional mesher, and accurate modeling of irregular spatial and temporal features.
In one embodiment, the method comprises providing a three-dimensional mesh which models the system to be solved and extruding the three-dimensional mesh to form a four-dimensional mesh. Both the three-dimensional mesh and the resulting four-dimensional mesh are unstructured. That is, they are not constrained to use hexahedral elements and are not subject to the limitations associated with the use of these elements. The three-dimensional and four-dimensional meshes in the present method comprise elements which are simplices in three-dimensional and four-dimensional space, respectively. The use of simplex elements allows the models to more accurately match the spatial and temporal shape of the modeled system than is possible using a structured mesh of hexahedral elements.
The four-dimensional mesh is generated from a three-dimensional mesh by extruding each of the simplices of the three-dimensional mesh in a fourth dimension (time.) The extrusion creates a four-dimensional prism from each of the three-dimensional simplices. These four-dimensional prisms are then divided into several four-dimensional simplices. This process is repeated until the newly generated four-dimensional simplices cover the desired time range. The newly generated four-dimensional simplices form a four-dimensional finite element model. The elements of this model can be selectively adjusted to obtain a finer mesh in areas of greater interest, and a coarser mesh in areas which are of less interest. The mesh can be refined in the spatial dimensions and, unlike time-stepped models, it can also be easily refined in the temporal dimension. The refined four-dimensional mesh may therefore be substantially simplified (i.e., unneeded elements can be eliminated or collapsed into other elements) so that fewer computing resources are required to generate a solution for the model. (It should be noted that the three-dimensional mesh can be generated from a two-dimensional mesh in the same way the four-dimensional mesh is extruded from the three-dimensional mesh.)
In one embodiment, the extrusion process proceeds as follows. (Because the process is useful to extrude from two dimensions to three, as well as from three dimensions to four, the description will be generalized to extrusion from n dimensions to n+1.) First, the original, n-dimensional mesh is duplicated and the duplicate is displaced in the n+1 dimension. Each node is connected to its duplicate by an edge. The combination of the existing edges and the newly formed edges define an n+1-dimensional prism corresponding to each of the original simplices. Then, for each prism, the node number for each of the nodes in the original n-dimensional simplex is identified. Based upon the ordering of the nodes (i.e., whether the first node is numerically higher or lower than the second node,) a bit pattern is generated. This bit pattern is used as an index to a lookup table that contains the combinations of the nodes that form the vertices of each of the new n+1-dimensional simplices.